﻿//===============================================================================
// Microsoft Innovation Centre - Western Europe
// Copyright (c) 2008 Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System.Collections.ObjectModel;
using Microsoft.WVB.Silverlight.Infrastructure;

namespace Microsoft.WVB.Framework.Entities
{
    /// <summary>
    /// Category used for grouping <see cref="Program"/> when browsing through <see cref="Explorer"/>
    /// or <see cref="EPG"/> controls.
    /// </summary>
    public class Category : BaseEntity
    {
        /// <summary>
        /// A <see cref="String"/> providing the Name of a <see cref="Category"/>
        /// </summary>
        public string Name
        {
            get
            {
                return this._Name;
            }
            set
            {
                this._Name = value;
                OnPropertyChanged(this.GetPropertySymbol(o => o.Name));
            }
        }
        private string _Name;

        /// <summary>
        /// A <see cref="String"/> definin the Value.
        /// </summary>
        public string Value
        {
            get
            {
                return this._Value;
            }
            set
            {
                this._Value = value;
                OnPropertyChanged(this.GetPropertySymbol(o => o.Value));
            }
        }
        private string _Value;

        /// <summary>
        /// A <see cref="Collection<T>"/> of child <see cref="Category"/>.
        /// </summary>
        public Collection<Category> ChildCategories
        {
            get
            {
                return this._ChildCategories;
            }
        }
        private Collection<Category> _ChildCategories = new Collection<Category>();
    }
}
